---
description: Example of Canvg usage in NodeJS.
---

import ContextProvider from '../../src/components/ContextProvider';

# NodeJS

Example of Canvg usage in NodeJS.

<ContextProvider>
  {({ branch, theme }) => (
    <iframe
      src={`https://codesandbox.io/embed/github/canvg/canvg/tree/${branch}/sandboxes/nodejs?fontsize=14&hidenavigation=1&module=%2Findex.js&theme=${theme}&view=editor`}
      style={{
        width: '100%',
        height: '500px',
        border: 0,
        borderRadius: '4px',
        overflow: 'hidden',
      }}
      title='canvg/canvg usage example'
      allow='accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking'
      sandbox='allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts'
    ></iframe>
  )}
</ContextProvider>
